import Request from '@/request'
import type { Response } from '@/types/global'

interface LoginParam {
  telephone: string
  password: string
}

interface Login {
  token: string
  telephone: string
}

export const loginR = (data: LoginParam): Promise<Response<Login>> => {
  return Request.post('/login', data)
}

export const register = (data: any): Promise<Response<any>> => {
  return Request.post('/register', data)
}
